package sicnu.cs.ich.ich.service;

import org.apache.rocketmq.client.exception.MQBrokerException;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.remoting.exception.RemotingException;
import sicnu.cs.ich.api.domain.entity.Ich;

/**
 * @author CaiKe
 * @date 2021/12/1 17:24
 */
public interface IIchRankService {

    /**
     * 消息队列通知type热度+1
     * @param arg
     */
    void ichTypeHitIncrementMQ(Integer arg) throws InterruptedException, RemotingException, MQClientException, MQBrokerException;

    /**
     * 指定非遗热度+1
     *
     * @param id 非遗id
     */
    void ichHitIncrement(Integer id) throws InterruptedException, RemotingException, MQClientException, MQBrokerException;

    /**
     * 指定非遗排行榜+1
     */
    void ichProvinceIncrement(Ich ich) throws InterruptedException, RemotingException, MQClientException, MQBrokerException;

    /**
     * 助力非遗
     *
     * @param ichId 非遗id
     */
    void updateIchHit(Integer ichId) throws InterruptedException, RemotingException, MQClientException, MQBrokerException;
}
